<!DOCTYPE html>
<html lang="en">
<head>
    {include file="_public/_head"/}
    <style>
        body { background: url("/public/images/bg3.png") no-repeat; background-size: 100%; background-attachment: fixed; }
        .description {
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 4;
            -webkit-box-orient: vertical;
        }
    </style>
</head>
<body>
{include file="_public/_header"/}
<div style="height: 1.6em"></div>
<div class="am-g am-g-fixed blog-g-fixed">
    <div class="am-u-md-8 am-panel">
        {if condition="[] eq $list['scenery'] && [] eq $list['news']"}
        <h3 class="am-article-title blog-title">
            <a href="">什么也没有找到，您可以看看其他人搜了什么。。。</a>
        </h3>
        {else/}
        <h3 class="am-article-title blog-title">
            <a href="">关于 <span style="color: #0e90d2;">{$keywords}</span> 的搜索结果</a>
        </h3>
        <ul class="am-tabs-nav am-nav am-nav-tabs" id="nav">
            {if condition="[] eq $list['scenery']"}
            <li class=""><a href="#" data-href="#tab1">热门景点</a></li>
            <li class="am-active"><a href="#" data-href="#tab2">新闻资讯</a></li>
            {else/}
            <li class="am-active"><a href="#" data-href="#tab1">热门景点</a></li>
            <li class=""><a href="#" data-href="#tab2">新闻资讯</a></li>
            {/if}
        </ul>
        <div class="blog-main" id="tab1" style="display: none;">
            {volist name="list.scenery" id="vo"}
            <article class="">
                <h3 class="am-article-title blog-title">
                    <a href="/scenery/{$vo.id}.html">{$vo.name}</a>
                </h3>
                <div class="am-g blog-content-list">
                    <a href="/scenery/{$vo.id}.html">
                        <div class="am-u-lg-5">
                            <p class="news-pic"><img src="{$vo.pic_url}"></p>
                        </div>
                        <div class="am-u-lg-7">
                            <p>票价：{$vo.price}</p>
                            <p>地理位置：{$vo.address}</p>
                            <p>百科链接：<a style="color: #0ba4ea;" href="{$vo.url}" target="_blank">网页链接</a></p>
                            <p>标签：
                                {volist name="vo.label" id="label"}
                                <span class="am-badge am-round">{$label}</span>
                                {/volist}
                        </div>
                    </a>
                </div>
            </article>
            <hr style="margin:0;">
            {/volist}
        </div>
        <div class="blog-main" id="tab2" style="display: none;">
            {volist name="list.news" id="vo"}
            <article class="">
                <h3 class="am-article-title blog-title">
                    <a href="/news/{$vo.id}.html">{$vo.title}</a>
                </h3>
                <h4 class="am-article-meta blog-meta">
                    <a href="/news.html?type={$vo.type}">{$vo.type_name}</a>
                    原标题《{$vo.title_source}》
                    <a href="{$vo.url}" target="_blank">查看原文</a>
                </h4>
                <div class="am-g blog-content-list">
                    {if condition="7 eq $vo['type']"}
                    <a href="{$vo.url}" target="_blank">
                        <div class="am-u-lg-4">
                            <p class="news-pic"><img src="{$vo.pic}?x-oss-process=style/list"></p>
                        </div>
                        <div class="am-u-lg-8">
                            <p class="description">{$vo.description}</p>
                        </div>
                    </a>
                    {else/}
                    <a href="/news/{$vo.id}.html">
                        <div class="am-u-lg-4">
                            <p class="news-pic"><img src="{$vo.pic}?x-oss-process=style/list"></p>
                        </div>
                        <div class="am-u-lg-8">
                            <p class="description">{$vo.description}</p>
                        </div>
                    </a>
                    {/if}
                </div>
            </article>
            <hr style="margin:0;">
            {/volist}
        </div>
        <p href="{$vo.url}" target="_blank">热门搜索</p>
        {/if}
        <p>
            {volist name="keywordsList" id="vo"}
            <a href="/search.html?keywords={$vo.keywords}">{$vo.keywords}</a>
            {/volist}
        </p>
    </div>
    {include file="_public/_sidebar"/}
</div>
{include file="_public/_footer"/}
<script>
    $('#nav').find('li').on('click', function () {
        $('#nav').find('.am-active').removeClass('am-active');
        $(this).addClass('am-active');
        var tab = $(this).find('a').data('href');
        $('.blog-main').hide();
        $("" + tab + "").show();
    });

    //默认显示
    var def = $(".am-active").find('a').data('href');
    if('#tab1' == def){
        $('#tab1').show();
    } else {
        $('#tab2').show();
    }
</script>
</body>
</html>